//
//  StepDataChartViewModel.swift
//  MoyoungHome
//
//  Created by 李然 on 2022/9/16.
//

import UIKit
import SwiftDate
import MYModule

open class StepDataChartViewModel: BaseDataChartViewModel {

	open override func getSelectedTimeString(with date: Date) -> String {
//		var dateFormatter = ""
//		switch self.chartType {
//		case .day, .custom:
//			dateFormatter = getCurrentLanguage() == .chinese ? "yyyy年MM月dd日 HH:mm" : "yyyy-MM-dd HH:mm"
//		case .week:
//			dateFormatter = getCurrentLanguage() == .chinese ? "yyyy年MM月dd日, E" : "yyyy-MM-dd, E"
//		case .month:
//			dateFormatter = getCurrentLanguage() == .chinese ? "yyyy年MM月dd日, E" : "yyyy-MM-dd, E"
//		}
//		return date.toString(.custom(dateFormatter))
        return date.localString
	}

	open override func getSelectedDataString(with index: Int) -> String {
		let count = self.dataSource.count > index ? self.dataSource[index] : 0
		return "\(Int(count))"
	}

	open override func getUnitString() -> String {
		return "unit_step".language
	}
}
